from redis import StrictRedis


class Config(object):
    DEBUG = None
    SECRET_KEY = 'R+j5ZkwvjJzcPxv5NhixEma8nvvENe3vn473ph0SWHkAUeY3cv+e8g=='
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/new_information_network'

    REDIS_HOST = '127.0.0.1'
    REDIS_PORT = 6379

    SESSION_TYPE = 'redis'
    SESSION_USE_SIGNER = True
    PERMANENT_SESSION_FILETIME = 86400
    SESSION_REDIS = StrictRedis(host=REDIS_HOST,port=REDIS_PORT)


class DevelopmentConfig(Config):
    DEBUG = True


class ProductionConfig(Config):
    DRBUG = False

config = {
    'development':DevelopmentConfig,
    'production':ProductionConfig
}